package com.fjnu.dao;

import com.fjnu.entity.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CommentDao {
    int insert(Comment newComment);
    int updateSupport(@Param("commentId") Integer commentId, @Param("incremented") Integer incremented);
    int updateOppose(@Param("commentId") Integer commentId, @Param("incremented") Integer incremented);
    List<Comment> selectAllCommentsForArticle(Integer articleId);
    List<Comment> selectCommentsWithLimitForArticle(@Param("articleId") Integer articleId,
                                                    @Param("startIndex") Integer startIndex,
                                                    @Param("endIndex") Integer endIndex);
}